memop: limit guest specified extent order
authorJan Beulich <jbeulich@suse.com>
Tue, 4 Dec 2012 18:38:26 +0000 (18:38 +0000)
committerJan Beulich <jbeulich@suse.com>
Tue, 4 Dec 2012 18:38:26 +0000 (18:38 +0000)
commit8f5a6d97909777e0285dfac6f678d32649d2981b
treebc5822aeee5b5709dd2b6a85c9996577dab03aae
parent54c82f996207b737abb50e0889d4de1696f833c1
memop: limit guest specified extent order

Allowing unbounded order values here causes almost unbounded loops
and/or partially incomplete requests, particularly in PoD code.

The added range checks in populate_physmap(), decrease_reservation(),
and the "in" one in memory_exchange() architecturally all could use
PADDR_BITS - PAGE_SHIFT, and are being artificially constrained to
MAX_ORDER.

This is XSA-31 / CVE-2012-5515.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
xen/common/memory.c